/*
 * @Descripttion: 
 * @version: 
 * @Author: mmzhang
 * @Date: 2021-07-27 16:02:34
 * @LastEditTime: 2022-01-13 10:37:01
 */
import table from '@/components/dt/table/render.js'
import Opt from '@/components/dt/info/Opt.js'

let _this = null

class Column extends Opt {
  constructor(vm) {
    super()
    _this = vm
    this.build()
  }

  build() {
    this.createAll()
    this.opts.push(...this.all)
  }

  createAll() {
    this.all = [{
        title: '展示姓名',
        field: 'userName',
        minWidth: 120
      },
      // {
      //   title: '工号',
      //   field: 'workNo',
      //   minWidth: 120
      // },
      {
        title: '展示手机号',
        field: 'phone',
        minWidth: 120
      },
      {
        title: '展示职位',
        field: 'positionName',
        minWidth: 120
      },
      {
        title: '展示邮箱',
        field: 'email',
        minWidth: 150
      },
      // {
      //   title: '微信',
      //   field: 'wechat',
      //   minWidth: 150
      // },
      {
        title: '展示公司名',
        field: 'companyName',
        minWidth: 200
      },
      {
        title: '展示地址',
        field: 'address',
        minWidth: 220
      },
      {
        title: '提交人',
        field: 'userNameWorkNo',
        minWidth: 120
      },
      {
        title: '提交人手机号',
        field: 'submitPhone',
        minWidth: 140
      },
      {
        title: '提交时间',
        field: 'submitTime',
        minWidth: 180
      }, {
        title: '审批状态',
        field: 'auditStateStr',
        minWidth: 120
      }, {
        title: '当前审批节点',
        field: 'nextChecker',
        minWidth: 120
      }, {
        title: '操作',
        fixed: 'right',
        minWidth: 150,
        align: 'center',
        slots: {
          default: (params, h) => {
            let btns = []
            btns.push({
              title: '流程信息',
              event: 'processFun',
              data: params.row
            })
            return table.cell.btns(_this, h, btns)
          }
        }
      }
    ]
  }

}

export default Column